package com.zp.strategy;

import com.zp.utils.CaffeineUtil;

/**
 * Caffeine 缓存策略
 */
//@Component
public class CaffeineStrategy implements CacheStrategy {
    @Override
    public String get(String key) {
        return CaffeineUtil.getCache().getIfPresent(key);
    }

    @Override
    public void set(String key, String value, int expireTime) {

    }

    @Override
    public void set(String key, String value) {
        CaffeineUtil.getCache().put(key, value);
    }

    @Override
    public void delete(String key) {

    }
}
